import React, { Component } from 'react';
import { Route, withRouter } from 'react-router-dom';
import RouterRoot from './Router/index';
import RouteFootNav from "./RouterView/FootNav/index";
import footNavs from "./common/data/footNav";
import { Provider } from 'react-redux';
import store from './Store';
import gurad from "./Router/router_gurad";

import SocketKeeper from './RouterView/SocketKeeper/SocketKeeper';

class App extends Component {
    constructor(props) {
        super(props);
        this.props = props;
        this.state={}
    }

    componentDidMount(){
       
    }
    componentWillUnmount(){
      
    }
    
    render() {
        return (
            <Provider store={store}>
                <div style={{ width: "100%", height: "100%", backgroundColor: "#fff" }}>
                    {RouterRoot}
                    <Route render={() => { return <SocketKeeper/> }} />
                    <Route render={() => { return <RouteFootNav navs={footNavs} /> }} />
                </div>
            </Provider>
        );
    }
}

// export default withRouter(gurad(App));
export default App;
